/********************************************************
*  Monica Jimenez Anton                                 *
*  Juan Luis Martinez Cesteros                          *
*  Practicas - IGr                                     *
********************************************************/
#ifndef Objetos3DH
#define Objetos3DH
#include "Color.h"
#include "TAfin.h"
#include "lista.h"
//---------------------------------------------------------------------------
class Objeto3D{
    public:
        Color *color;
        TAfin * marco_de_coordenadas;
        int estilo; //0 relleno, 1 wireframe

        virtual void draw(){};
        Objeto3D();
         ~Objeto3D();

};
//---------------------------------------------------------------------------
/*class ObjetoCuadrico : public Objeto3D {

       public:
              virtual void draw();

       protected:
              GLUquadricObj * quad;

};  */
//---------------------------------------------------------------------------
class Cilindro : public Objeto3D{

       public:
              void draw();
              Cilindro(GLfloat b,GLfloat t,GLfloat h,int sl,int st){
                    base = b;
                    top = t;
                    height = h;
                    slices = sl;
                    stacks = st;
                    quad = gluNewQuadric();
              };
       private:
              GLfloat base,top,height;
              int slices,stacks;
              GLUquadricObj * quad;
};
//---------------------------------------------------------------------------
class Disco : public Objeto3D{
       public:
              void draw();
              Disco(GLfloat r1,GLfloat r2,int la,int an){
                    radioInterior = r1;
                    radioExterior = r2;
                    lados = la;
                    anillos = an;
                    quad = gluNewQuadric();
              };
       private:
               GLfloat radioInterior, radioExterior;
               int lados, anillos;
               GLUquadricObj* quad;

};
//---------------------------------------------------------------------------
class Esfera : public Objeto3D{

       public:
              void draw();
              Esfera(GLfloat radius_, int slices_, int stacks_){
                   radius = radius_;
                   slices = slices_;
                   stacks = stacks_;
                   quad = gluNewQuadric();
              }
       private:
              GLfloat radius;
              int slices,stacks;
              GLUquadricObj * quad;
};
//---------------------------------------------------------------------------
class ObjetoCompuesto3D: public Objeto3D {

        public:
              void draw();
              ObjetoCompuesto3D();
              ~ObjetoCompuesto3D(){delete objetos;};
              Lista<Objeto3D> * getObjetos(){return objetos;};

        protected:
              Lista<Objeto3D> * objetos;
};
//---------------------------------------------------------------------------
#endif
